package cqut.wys.controller;

import cqut.wys.dao.entity.TbUsers;
import cqut.wys.dao.entity.TbUsersExample;
import cqut.wys.dao.mapper.TbUsersMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author wuyoushan@zbj.com
 * @date 2017/4/17.
 */
@RestController
public class HomeController {

    @Autowired
    TbUsersMapper tbUsersMapper;

    @RequestMapping(value = "/list",method = RequestMethod.GET)
    public List<TbUsers> index(){
        TbUsersExample tbUsersExample=new TbUsersExample();
        List<TbUsers> tbUsersList=tbUsersMapper.selectByExample(tbUsersExample);
        return tbUsersList;
    }
}
